package org.example;

import org.example.service.User;
import org.example.service.UserService;
import org.example.service.UserServiceImpl;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
	public static void main(String[] args) {
		// 创建一个Spring容器
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);

		UserService userService = (UserService) applicationContext.getBean("userServiceImpl");
//		userService.test();
//		userService.config();

		userService.init();

		User user = (User) applicationContext.getBean("zk");


		System.out.println(user.getName());
	}
}